//
//  WFServiceCheckBoxCellTableViewCell.m
//  WisdomFarm
//
//  Created by sky on 2018/2/18.
//  Copyright © 2018年 sky. All rights reserved.
//

#import "WFServiceCheckBoxCell.h"

@implementation WFServiceCheckBoxCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _neededLabel = [[UILabel alloc] init];
        _neededLabel.textColor = [UIColor themeColor];
        _neededLabel.font = SCFont(14);
        _neededLabel.text = @"*";
        [self.contentView addSubview:_neededLabel];
        _titleLabel = [[UILabel alloc] init];
        _titleLabel.textColor = [UIColor textTitleColor];
        _titleLabel.font = SCFont(14);
        [self.contentView addSubview:_titleLabel];
        _groupView = [[WFCheckBoxGroupView alloc] init];
        [self.contentView addSubview:_groupView];
        
        [_neededLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.offset(15);
            make.centerY.offset(0);
        }];
        [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.neededLabel.mas_right).offset(4);
            make.centerY.offset(0);
        }];
        [_groupView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.titleLabel.mas_right).offset(10);
            make.right.offset(0);
            make.top.bottom.equalTo(self.contentView);
        }];
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
